<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
    <title>CSS Test: :enabled on an input type=hidden element</title>
    <style type="text/css">
    div
    {
        color: red;
    }
    input:enabled + #test
    {
        color: green;
    }
</style>
</head>
<body>
    <p>The test passes if the Filler Text below is green.</p>
    <input type="hidden" />
    <div id="test">Filler Text</div>
    <div id="testresult" style="color: blue">Running</div>
    <script type="text/javascript">


            function ArrayContains(array, value, ci)
            {
                ci = ci == true ? true : false;
                for (var i = 0; i < array.length; i++)
                {
                    if (ci && array[i].toLowerCase() == value.toLowerCase())
                    {
                        return true;
                    }
                    else if (array[i] == value)
                    {
                        return true;
                    }
                }
                return false;
            }

            function TestCase()
            {
             try
            {
             var target = document.getElementById("test");
             var val = getComputedStyle(target, null).getPropertyValue("color");
             var aExpectedValues = new Array("green", "#008000", "rgb(0, 128, 0)");

             if (ArrayContains(aExpectedValues, val, true))
             {

              document.getElementById("testresult").innerHTML = "Pass";
              return;
             }
            }   
            catch(e){}
                
             document.getElementById("testresult").innerHTML = "Fail";
            }

            TestCase();

    </script>
</body>
</html>
